<%= form_for(Settings::General.new,
             url: admin_settings_general_settings_path,
             html: { data: { action: "submit->config#updateConfigurationSettings" } }) do |f| %>
  <details class="crayons-card">
    <summary class="crayons-subtitle-2 p-6">Newsletter</summary>
    <div class="p-6 pt-0">
      <fieldset class="grid gap-4">
        <div class="crayons-field">
          <%= admin_config_label :mailchimp_api_key, "Mailchimp API Key" %>
          <%= admin_config_description Constants::Settings::General.details[:mailchimp_api_key][:description] %>
          <%= f.text_field :mailchimp_api_key,
                           class: "crayons-textfield",
                           value: Settings::General.mailchimp_api_key %>
        </div>

        <div class="crayons-field">
          <%= admin_config_label :mailchimp_newsletter_id, "Main Newsletter" %>
          <%= admin_config_description Constants::Settings::General.details[:mailchimp_newsletter_id][:description] %>
          <%= f.text_field :mailchimp_newsletter_id,
                           class: "crayons-textfield",
                           value: Settings::General.mailchimp_newsletter_id %>
        </div>

        <div class="crayons-field">
          <%= admin_config_label :mailchimp_tag_moderators_id, "Tag Moderators Newsletter" %>
          <%= admin_config_description Constants::Settings::General.details[:mailchimp_tag_moderators_id][:description] %>
          <%= f.text_field :mailchimp_tag_moderators_id,
                           class: "crayons-textfield",
                           value: Settings::General.mailchimp_tag_moderators_id %>
        </div>

        <div class="crayons-field">
          <%= admin_config_label :mailchimp_community_moderators_id, "Community Moderators Newsletter" %>
          <%= admin_config_description Constants::Settings::General.details[:mailchimp_community_moderators_id][:description] %>
          <%= f.text_field :mailchimp_community_moderators_id,
                           class: "crayons-textfield",
                           value: Settings::General.mailchimp_community_moderators_id %>
        </div>
      </fieldset>
      <%= render "update_setting_button", f: f %>
    </div>
  </details>
<% end %>
